package com.fastloan.mgt.product.basics.dao;

import com.fastloan.mgt.product.basics.model.Product;
import com.fastloan.mgt.product.basics.model.vo.ProductHotExt;
import com.fastloan.mgt.sequence.model.Sequence;
import com.kawins.base.BaseMapper;
import org.apache.ibatis.annotations.Insert;

import java.util.List;
import java.util.Map;

/**
 * @author admins
 *         createTime 2017/11/06
 */
public interface ProductMapper extends BaseMapper<Product> {
    List<ProductHotExt> queryAddressProduct(Map<String, Object> map);

    List<ProductHotExt> selectRollingGraph(Map<String, Object> map);

    List<ProductHotExt> queryHotSell(Map<String, Object> map);

    List<ProductHotExt> queryByOrg(Map<String, Object> map);

    List<Product> pageList(Map<String, Object> map);

    /**
     * 查询序列
     *
     * @return 序列
     */
    Long selectSequence(String orgId);

    @Insert("INSERT INTO SEQUENCE(SEQ_NAME, CURRENT_VAL, INCREMENT_VAL) VALUES(#{seqName}, #{currentVal}, #{incrementVal})")
    void insertSequence(Sequence sequence);

}
